<?php

	header('Content-Type: text/html; charset=UTF-8');

	$nomCateg = $_POST['nomCateg'];
	
	$tabReponse = array();
	$donnees = array();
	
	$selectSiteFlux =$pdo->prepare('select * from information where id_categorie = (select id_categorie from categorie where nom ="'.$nomCateg.'");');
	$selectSiteFlux->execute();
	
	while($siteFlux =  $selectSiteFlux->fetch())
	{
		$donnees[] = $siteFlux;
	}
	$selectSiteFlux->closeCursor();
	$tabReponse['informations'] = $donnees;
	
	echo json_encode($tabReponse);
	
	
?>